import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Avatar from "@/components/Avatar";
import MainView from "@/views/MainView";
import HomeShow from "@/views/HomeShow";
import swiperview from "@/views/SwiperView";
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: Home,
    children:[
      {
        path:'/',
        name:'HomeShow',
        component: HomeShow
      },
      {
        path: '/about',
        name: 'About',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
      },
    ]
  },
  {
    path: '/swiper',
    name: 'swiperview',
    component: swiperview,
    children:[

    ]
  },
  {
    path: '/avatar',
    name: 'avatar',
    component: Avatar
  },
  {
    path: '/MainView',
    name: 'MainVie',
    component: MainView
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
